﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;

namespace Mota.EditModule
{
    public class EqualStatement:IStatement
    {
        private string columnName;
        private object value;
        public string ColumnName { 
            get
            {
                return columnName;
            }
        }
        public object Value { 
            get 
            {
                return value;
            } 
        }
        public EqualStatement(string columnName, object value)
        {
            this.columnName = columnName;
            this.value = value;
        }
        public override string ToString()
        {
            if (value is DBNull)
                return String.Format(" {0} IS NULL", columnName);
            return String.Format(" {0}='{1}' ", columnName, value);
        }
    }
}
